﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;

namespace MailSender
{
    public class SendNotificationToProofReader
    {
        public static void SendMailMessageToProofReaderDraftSubmitted(string from, string to,string Username)
        {
            // Instantiate a new instance of MailMessage
            MailMessage mMailMessage = new MailMessage();

            // Set the sender address of the mail message
            mMailMessage.From = new MailAddress(from);
            // Set the recepient address of the mail message
            mMailMessage.To.Add(new MailAddress(to));

            // Check if the bcc value is null or an empty string
            
            // Set the subject of the mail message
            mMailMessage.Subject = "Draft Submitted";
            // Set the body of the mail message
            mMailMessage.Body = "A draft has been submitted by Username: " + Username + " for approval";

            // Set the format of the mail message body as HTML
            mMailMessage.IsBodyHtml = true;
            // Set the priority of the mail message to normal
            mMailMessage.Priority = MailPriority.Normal;

            // Instantiate a new instance of SmtpClient
            SmtpClient mSmtpClient = new SmtpClient();
            // Send the mail message
            mSmtpClient.Send(mMailMessage);
        }
    }
}
